from docx import Document

#实例化
document = Document("./protocol.docx")

output_file = open(file='output.txt', mode='w', encoding='utf-8')
# 遍历输出docx 对象涉及段落
for p in document.paragraphs:
    # 输出段落文本长度
    #print(p.text)
    # 数据段落引用样式
    #print(p.style.name)
    output_file.write(p.text)
    output_file.write("\n")
 

